#ifndef CLIONPROJECT_CLIENTCHAIN_H
#define CLIONPROJECT_CLIENTCHAIN_H

#include <stdbool.h>
#include "../UsedStd.h"

struct ClientNode{
    bool isCostumer;    // 是否为costumer（顾客），为假则是进货商
    double balance;     // 如果是顾客则有余额，新创建余额为0
    char clientName[STR_MAX_LEN];
    int lv;
    int year, month, day;
    struct ClientNode * nextClient, * preClient;
};



void displayAllClients(struct ClientNode * head);

void displayThisClient(struct ClientNode * displayClientPtr);

void buildClientChain(struct ClientNode ** head, struct ClientNode ** tail);

void delClient(struct ClientNode ** head, struct ClientNode ** tail, struct ClientNode * p);

void addClient(struct ClientNode ** head, struct ClientNode ** tail);

void rebuildClientFile(struct ClientNode * head);

void changeLv(struct ClientNode * p);
#endif //CLIONPROJECT_CLIENTCHAIN_H
